package com.wengzw.gateway.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wengzw.gateway.entity.AuthUserDetails;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
@Primary
public interface UserMapper extends BaseMapper<AuthUserDetails> {
    /**
     * 通过用户名获取用户信息
     *
     * @param mobile 用户名
     * @return 用户信息对象
     */
    @Select("SELECT * FROM user WHERE mobile = #{mobile}")
    AuthUserDetails getUserByUser(String mobile);
}